#include<iostream>
#include<cmath>
#include"ProblemA.h"
using namespace std;

double f(double x){
    return x - tan(x);
}

double df(double x){
    return 1 - 1/(cos(x) * cos(x));
}

int main(){

    double initial_1 = 4.5, initial_2 = 7.7;
    double eps = 10e-7;

    Newton zero1(initial_1, eps, f, df);
    cout << "在" << initial_1 << "附近,";
    CheckPrint(zero1.solve(), f);

    Newton zero2(initial_2, eps, f, df);
    cout << "在" << initial_2 << "附近,";
    CheckPrint(zero2.solve(), f);

    return 0;
}